#include <stdio.h>

#define DONE_KEY '#'
#define SPACE_KEY ' '
#define LINE_BREAK '\n'

int main(void)
{
    int all_count = 0;
    int space_count = 0;
    int line_count = 0;
    char ch1;
    printf("please enter letters \n");
    while ((ch1 = getchar()) && ch1 != DONE_KEY)
    {
        switch (ch1)
        {
            case SPACE_KEY:
                space_count++;
                break;
            case LINE_BREAK:
                line_count++;
                break;
            default:
                all_count++;
                break;
        }
    }
    printf("total number of char %d \n", all_count);
    printf("total number of spaces %d \n", space_count);
    printf("total number of line %d \n", line_count);
    return 0;
}
